<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <!--视口viewport  只有移动端才识别-->
    <meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=0"/>
    <title>Touch事件</title>
    <style>
        body{
            margin: 0;
            padding: 0;
        }
        a{
            height: 100px;
            width: 100%;
            display: block;
            /*去除 */
            -webkit-tap-highlight-color: red;
            border: 10px solid black;
            box-sizing: border-box;
        }
    </style>
</head>
<body>
<a href="#"></a>
<script>
    var a = document.querySelector('a');
    /*触摸开始事件*/
    a.addEventListener('touchstart',function(e){
        console.log('touchstart');
        console.log(e.changedTouches);
        console.log(e.targetTouches);
        console.log(e.touches);
    });
    /*触摸滑动事件*/
    a.addEventListener('touchmove',function(e){
        console.log('touchmove');
        console.log(e.changedTouches);
        console.log(e.targetTouches);
        console.log(e.touches);
    });
    /*触摸结束事件*/
    a.addEventListener('touchend',function(e){
        console.log('touchend');
        console.log(e.changedTouches);
        console.log(e.targetTouches);
        console.log(e.touches);
    });
</script>
</body>
</html>